import { axios } from '@/utils/request'

/*export function select (parameter) {
  return axios({
    url: '/sys/sysUser/select/' + parameter.id,
    method: 'get'
  })
}*/

export function selectPage (parameter) {
  return axios({
    url: '/sys/sysUser/selectPage',
    method: 'post',
    params: parameter
  })
}

export function del (id) {
  return axios({
    url: '/sys/sysUser/' + id + '/delete',
    method: 'get'
  })
}

export function saveOrUpdate (parameter) {
  return axios({
    url: '/sys/sysUser/saveOrUpdate',
    method: 'post',
    data: parameter
  })
}

export function login (parameter) {
  return axios({
    url: '/sys/sysUser/login',
    method: 'post',
    params: parameter
  })
}

export function logout () {
  return axios({
    url: '/sys/sysUser/logout',
    method: 'get'
  })
}

export function getInfo () {
  return axios({
    url: '/sys/sysUser/selectPermission',
    method: 'get'
  })
}

export function deleteBatch (parameter) {
  return axios({
    url: '/sys/sysUser/deleteBatch',
    method: 'post',
    data: {
      'users': parameter
    }
  })
}

export function updatePassword (parameter) {
  return axios({
    url: '/sys/sysUser/updatePassword',
    method: 'post',
    params: parameter
  })
}